import time

def time_calulate(func):
    def wrapper(*args,**kwargs):
        start_time = time.time()
        f = func(*args,**kwargs)
        spend_time = time.time() - start_time
        print('耗时：{}'.format(spend_time))
        return f
    return wrapper

@time_calulate
def case_1():
    time.sleep(2)

if __name__ == '__main__':
    case_1()